table.insert(itemActions,
	function(item, action)
		-- MAGIC circlets
		-- see: dir .. "readme.txt" for information regarding these variables
		local priority = 6
		local identify = true
		local dump = true

		if not (item.quality == ItemQuality.Magic and item.baseItem.baseType.Type == ItemKind.Circlet) then 
			return false
		elseif action == aPICK and (not item.flags.Identified or isGoodMagicCirclet(item)) then
			return priority
		elseif action == aIDENT then
			return identify
		elseif action == aSELL and item.flags.Identified and not isGoodMagicCirclet(item) then
			return true
		elseif action == aDUMP and item.flags.Identified and not isGoodMagicCirclet(item) then
			return dump
		end

		return false
	end
)

function isGoodMagicCirclet(item)
	-- no easy customs available for this
	-- feel free to change the lower prefix/suffix bounds
	local prefix, suffix, affix = false, false, false

	for i = 0, item.mods:size() - 1 do
		if item.mods[i].Stat.Type == StatType.Sockets and
				item.mods[i].Value == 3 then -- 3soc->prefix
			prefix = true
		elseif item.mods[i].Stat.Type == StatType.ClassSkillsBonus and
				item.mods[i].Value == 2 then -- 2sk->prefix
			prefix = true
		elseif item.mods[i].Stat.Type == StatType.SkillTabBonus and
				item.mods[i].Value == 3 then --  3sktab->prefix
			prefix = true
		elseif item.mods[i].Stat.Type == StatType.MaxMana and
				item.mods[i].Value >= 91 then --  91+mp->prefix
			prefix = true
		elseif item.mods[i].Stat.Type == StatType.FasterCastRate then
			suffix = true -- 10-20% fcr->suffix
		elseif item.mods[i].Stat.Type == StatType.FasterMoveVelocity and
				item.mods[i].Value == 30 then -- 30frw->suffix
			suffix = true
		elseif (item.mods[i].Stat.Type == StatType.Strength or
				item.mods[i].Stat.Type == StatType.Dexterity or
				item.mods[i].Stat.Type == StatType.Energy) and
				item.mods[i].Value >= 21 then -- 21+str/dex/energy->suffix
			suffix = true
		elseif item.mods[i].Stat.Type == StatType.MaxLife and
				item.mods[i].Value >= 81 then -- 81+hp->suffix
			suffix = true
		elseif item.mods[i].Stat.Type == StatType.MagicFind and
				item.mods[i].Value >= 26 then -- 26+mf->suffix
			suffix = true
		elseif item.mods[i].Stat.Type == StatType.MagicFind and
				item.mods[i].Value >= 37 then -- 37+mf->affix (for mf circs)
			affix = true
	elseif hasCertainSockets(item, "3") then -- 3os
			sox = true

		end
	end

	return (
		    prefix and (suffix or sox) or
			affix -- 37-41% MF Circlet
		   )
end

--[[
To Be Added:
------------
Prefixes
-----------alvl-clvl-freq---name------------------------
Godly		50	43	50	+101% to +200% Defense
Deadly		5	3	45	21% to 30% enhanced Damage
Visionary	111	25	18	25	+1% to Attack Rating per Level
Mnemonic	25	18	25	+0.75 to Mana per Level
Prismatic	42	31	168	+16% to +20% to each Resistance
Chromatic	55	41	165	+21% to +30% to each Resistance
Garnet		18	13	54	Fire-Resist +21% to +30%
Ruby		25	18	75	Fire-Resist +31% to +40%
Cobalt		18	13	54	Cold-Resist +21% to +30%
Sapphire	25	18	75	Cold-Resist +31% to +40%
Coral		18	13	54	Lightning-Resist +21% to +30%
Amber		25	18	75	Lightning-Resist +31% to +40%
Jade		18	13	54	Poison-Resist +21% to +30%
Emerald		25	18	75	Poison-Resist +31% to +40%
Victorious	17	12	68	+2 to +5 Mana after each Kill
Arcadian	15	11	30	+51-100 AR vs Demons & 26-50% Dmg to Demons


Suffixes
------------------alvl-clvl-freq---name-------------------
of Amicae			51	43	204	Damage Reduced By 8 to 15
of Life Everlasting	45	37	180	Damage Reduced By 10 to 25
of Negation			42	35	168	Magic Damage Reduced By 4 to 6
of Maiming			45	37	180	+11 to +12 Maximum Damage
of Performance		81	73	324	+10 to +13 Minimum Damage
of Revivification	38	30	152	Replenish Life +11 to +15
of the Lamprey		77	65	308	+7% to +8% Life stolen per Hit
of the Vampire		78	66	312	+7% to +8% Mana stolen per Hit
of the Elephant		37	7	74	+0.5 Life/Level & +0.25 Mana per Level
]]--